PTL 1 includes code information deciphering means for deciphering code information from an imaged code image, lens movement means for moving a lens to gradually predetermined locations depending on focal depths at the respective imaging distances, and error notification means for notifying of a read error. In a case where codes are not deciphered by the code information deciphering means, control means for repeating an operation of moving the lens to the next stage, imaging the code again, and deciphering the code information and controlling the error notification means to notify of the error when the number of times the repetition is performed reaches the number of stages of the movement locations of the lens is further provided. Accordingly, a code reading device capable of reading a certain code at an arbitrary distance is provided without using a special auto-focusing device.